package com.example.controller;

import com.example.api.Result;
import com.example.service.OperateLogService;
import com.example.vo.report.GetAllLogs;
import lombok.extern.slf4j.Slf4j;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

@RestController
@Slf4j
@RequestMapping("/log")
public class LogController {
    @Autowired
    private OperateLogService operateLogService;
    @GetMapping("/page")
    public Result<GetAllLogs> getAllLogs(Integer page, Integer pageSize) {
        log.info("获取日志列表");
        return Result.success(operateLogService.getAllLogs(page, pageSize));
    }
}
